<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>基于SpringBoot完成数据库信息的增删改查</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
</head>
<body>
<button class="layui-btn" id="add" data-type="reload" onclick="window.location.href = 'save'">新增</button>
<table class="layui-table">
    <colgroup>
        <col width="150">
        <col width="200">
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>密码</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="user:${users}">
        <td th:text="${user.id}"></td>
        <td th:text="${user.name}"></td>
        <td th:text="${user.password}"></td>
        <td>
            <a type="button" class="layui-btn" th:href="@{/delete/}+${user.id}">删除</a>
            <a type="button" class="layui-btn" onclick="window.location.href = 'update'">修改</a>
        </td>
    </tr>
    </tbody>
</table>
<script src="layui/layui.js"></script>
</body>
</html>
